package com.ocom.common.vo.human;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ocom.common.entity.typehandler.PersonInfoHandle;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class UserInfoYkmVo implements Serializable {
    private static final long serialVersionUID = -3870410133093988928L;
    @JsonProperty("pId")
    private Long pId;
    private Long comId;
    private Long deptId;
    @JsonProperty("pCode")
    private String pCode;
    @JsonProperty("pName")
    private String pName;
    @JsonProperty("pPwd")
    private String pPwd;
    @JsonProperty("pSex")
    private Integer pSex;
    @JsonProperty("pType")
    private long pType;
    @JsonProperty("pPhone")
    private String pPhone;
    @JsonProperty("pIdentity")
    private String pIdentity;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonProperty("pBorn")
    private Date pBorn;
    @JsonProperty("pAddress")
    private String pAddress;
    @JsonProperty("pPhotoUrl")
    private String pPhotoUrl;
    @JsonProperty("pPhotoUrl2")
    private String pPhotoUrl2;
    @JsonProperty("status")
    private Integer status;
    @JsonProperty("deptName")
    private String deptName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String createTime;

    @JsonProperty("encryIdentity")
    private String encryIdentity;

    @JsonProperty("encryPhone")
    private String encryPhone;

    @JsonProperty("bankNo")
    private String bankNo;


    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+08")
    @JsonProperty("endDate")
    private Date endDate;

    @JsonProperty("regionId")
    private Integer regionId;

    @JsonProperty("regionOnline")
    private Integer regionOnline;

    public void setPPhone(String pPhone) {
        this.pPhone = PersonInfoHandle.decryptS(pPhone);
    }

    public void setpPhone(String pPhone) {
        this.pPhone = PersonInfoHandle.decryptS(pPhone);
    }

    public void setpIdentity(String pIdentity) {
        this.pIdentity = PersonInfoHandle.decryptS(pIdentity);
    }

    public void setBankNo(String bankNo) {
        this.bankNo = PersonInfoHandle.decryptS(bankNo);
    }

    public void setpPwd(String pPwd) {
        String value  = PersonInfoHandle.decryptS(pPwd);
        this.pPwd = value;
    }

}
